IModel interface

Namespace: NextDesign.Core

Description

Provides access to NextDesign's design model information.

Affiliation area

Name Description
Model APIs that access the model.

Inherit Base

Name Description
IObject Represents an identifiable object.

Derivation destination

Name Description
IRelationship Access object for related information.
IProject Provides access to project information.

Property

Name Description
ClassName Class Name Gets the fully qualified name of the
Metaclass.
Description Description
Errors Gets a collection of error information for this model.

Error information includes summary information.
HasError Checks this model for errors.
Returns True if there is an error in this model.

This rating includes summary information.
HasErrorWithChildren Checks for errors in this model and any elements below it that are children of this model.
Returns True if there is an error in this model and the elements below this model that are owned by this model.

This rating includes summary information.
IsDeleted Checks if this instance has been deleted.
IsEditable Checks if this instance is editable.
IsProxy Checks if this instance is a proxy element.
In the distributed environment, the proxy element is generated when the unit that records this instance information is not read.
ModelPath Model hierarchy path of this instance
The path that combines the model hierarchy starting from the model root or the product line with the path delimiter ("/") Returns a string.
Name Name
Owner Model that directly owns this instance
If this instance is related or the owning model does not exist, null is returned.
OwnerProject Project that holds this instance

Method

Name Description
AddError Adds error information for this model and returns the added error information.
AddNewModel Adds an instance of the specified class to the specified field of this instance as the field value. The
instance will be added as the last element of the field.
Instantiation is allowed even if the specified class is an abstract class, and it is added as the last element of the corresponding field.
The specified field must be owned by the class type.
Exception is not thrown even if the multiplicity upper bound constraint of the field with multiplicity of 2 or more is violated.

The specified class name must be compatible with the data type of the field.
When there is more than one matching class in case of fuzzy matching, the instance of the type compatible class found first is added.
AddNewModelAt Adds an instance of the specified class with the add position to the specified field of this instance as the field value.
Allow instantiation even if the specified class is an abstract class and add it as a field value at the specified position.
The specified field must be owned by the class type.
Note that an exception is not thrown even if the multiplicity upper bound constraint of a field with multiplicity of 2 or more is violated.

The specified class name must be compatible with the field data type.
Also, when there is more than one matching class when making a fuzzy match, the instance of the type compatible class found first is added.
AddNewModelTo Adds an instance of the specified class with the specified position to the specified field of this instance as the field value.
Allow instantiation even if the specified class is an abstract class and add it as a field value at the specified position.
The specified field must be owned by the class type.
Note that an exception is not thrown even if the multiplicity upper bound constraint of a field with multiplicity of 2 or more is violated.

The specified class name must be compatible with the field data type.
Also, when there is more than one matching class when making a fuzzy match, the instance of the type compatible class found first is added.
As Checks if this instance is compatible with the specified class type.
Returns True if this instance is an instance of the specified class or its subclasses.
AsIn(IEnumerable<string>,bool) Checks if this instance is compatible with the class type specified by multiple string types.
Returns True if this instance is an instance of any of the specified classes, or their subclasses.
AsIn(string,bool) Checks if this instance is compatible with the class type specified by the comma separated string type.
Returns True if this instance is an instance of any of the specified classes, or their subclasses.
CanRelate Checks if the specified field in this instance can be associated with the given model.
Returns True if it can be associated.
This method evaluates not only the field type, but also the following field constraints:
[Evaluation Constraints]
-Path Constraints
-Type Constraints
-Maximum Multiplicity

In addition, when the model itself or the associated model is a deleted model or a temporary proxy. Returns False.
False is also returned when the following fields are specified.
- Product line feature assignment field
- System.Core tagged field
- Owned field
CanRelateAny Checks if this instance can be associated with the given model.
Returns True if it can be related by any reference field in this instance.
False is returned if the model to be associated with itself or the deleted model is a temporary proxy.
Note that owned fields are not included.
Count Gets the number of values in the specified field.

This method does not evaluate IContextOption.PlModelAccessMode.
Delete Delete this instance.
If you call this method on an already deleted instance, nothing happens.

Deleting this instance causes changes to the model, such as:
-The ownership relationship between this instance and the owner (parent element) is deleted.
-All reference relations with this instance as the relation end will be deleted.
-All the elements below this child element owned by this instance, and the reference relations with those elements as the relation ends are deleted.
FindChildrenByClass Finds instances of the specified class among the owned instances of this instance.
This method evaluates IContextOption.PlModelAccessMode.

Returns a collection of owned instances of the specified class.
If the class specified in the class name cannot be found, an empty collection is returned.
Also returns an empty collection if no such instance exists.
FindChildrenByClassDisplayName Finds the instance of the class with the specified display name among the owned instances of this instance.
This method evaluates IContextOption.PlModelAccessMode.

Returns a collection of owned instances of the class with the specified display name.
Returns an empty collection if no such instance exists.
FindChildrenByClassTag Obtains the instance of the class to which the specified tag is given among the instances in the ownership relationship of this instance.
This method evaluates IContextOption.PlModelAccessMode.

Returns a collection of instances of the class to which the specified tag is attached among the instances that have an ownership relationship.
Returns an empty collection if no such instance exists.
FindChildrenByTag Gets the instance with the specified tag from among the instances in the ownership relationship of this instance.
This method evaluates IContextOption.PlModelAccessMode.

Returns a collection of instances with the specified tag, out of the instances that have an ownership relationship.
Returns an empty collection if no such instance exists.
FindOwnerByClass Gets the first owning instance of the specified class that holds this instance.

Traces the instance that owns this instance towards the parent and returns the first instance of the specified class found.
Even when searching up to the top-level parent element, if no corresponding instance is found, null is returned.

Note that if the class specified in the class name cannot be found, null is returned.
In addition, when there is more than one matching class when making a fuzzy match, the instance of the class found first is returned.
GetAllChildren Get all owned instances that can be searched by depth-first search of ownership from this instance.
This method evaluates IContextOption.PlModelAccessMode.

Returns a collection of all owned instances that can be searched by depth-first search for ownership with this instance as the base.
Returns an empty collection if no such instance exists.
GetAllErrorsWithChildren Get all error information including elements under the child element owned by this model.
If no error information exists, returns an empty collection.

Error information includes summary information.
GetChildren Gets the owning instance that this instance has a direct ownership relationship with.
This method evaluates IContextOption.PlModelAccessMode.

Returns a collection of owned instances that have a direct ownership relationship with this instance.
Returns an empty collection if no such instance exists.
GetDerivedFromRelationsOf If this model is an element derived from the specified model, get all its derived associations.
For example, if this model is an element derived from {element A}, by specifying {element A} in the argument, the derivation relation can be obtained.

It can be used for the following processes.
-When the request object and the specification object have a derivation relationship, get the relationship to the request object from the specification object side.

This method evaluates IContextOption.PlModelAccessMode.

Returns an empty collection if no such association exists.
GetDerivedModels Acquires the instance from which this instance is derived by the specified related class.
If the related class is unspecified (null), all derivation source instances are acquired.
This method evaluates IContextOption.PlModelAccessMode.

This method returns an empty collection if any of the following cases apply:
- There is no derived instance associated with the derived relation
- The specified related class cannot be found
- The specified related class is not a derived association
- Specified Missing reference field to derivation source by derived association class
GetDerivedToRelationsOf If the specified model is an element derived from this model, get all its derived relationships.
For example, if there is a {element B} derived from this model, by specifying {element B} as an argument, you can obtain the derivation association.

It can be used for the following processes.
-When the request object and the specification object have a derivation relationship, get the relationship to the specification object from the request object side.

This method evaluates IContextOption.PlModelAccessMode.

Returns an empty collection if no such association exists.
GetDeriveRelationsOf Get all derived associations with the specified model.
This method evaluates IContextOption.PlModelAccessMode.

Returns an empty collection if no such association exists.
Note that this method does not evaluate the derivation direction.
GetDerivingModels Acquires the instance derived from this instance by the specified related class.
If the related class is unspecified (null), get all derived instances.

This method evaluates IContextOption.PlModelAccessMode.

This method returns an empty collection if any of the following cases apply:
- There is no derived instance associated with the derived relation
- The specified related class cannot be found
- The specified related class is not a derived association
- Specified Missing reference field to derived destination by derived association class
GetField Gets the value of the specified field of this instance.
If the multiplicity of the specified field is 2 or more, get the first element of the corresponding field.
GetFieldAt Gets the value at the specified index position of the specified field of this instance.
GetFieldString Gets the value of the specified field of this instance in string format.
If the specified field is a class type, get the instance name at the beginning of that field.
If the multiplicity is 2 or more, get the first element of the corresponding field.
GetFieldStringAt Gets the value at the specified index position of the specified field of this instance in string format.
If the field at the specified index position is of class type, get the instance name at the beginning of that field.
GetFieldValues Gets the value collection for the specified field.
This method evaluates IContextOption.PlModelAccessMode.

Returns an empty collection if no such field value exists.
Note that the data type of the field specified with this method must be a class type.
GetFieldValuesByFieldTag Gets an enumeration of the values for the field with the specified tag.
If there are multiple fields with the corresponding tag, the enumeration of the values of all the fields is combined and returned.
This method does not evaluate IContextOption.PlModelAccessMode. Note that the product will also return any invalid elements.

Returns an empty collection if no such field value exists.

Note that the data type of the field to which the tag targeted by this method is added is arbitrary. Therefore, the enumeration returned by this method is of type object.
When using, it is necessary to convert to the optimum data type.
GetOwnerField Obtains the field that owns this model.
Returns null if this model is related or if there is no owning model.
GetOwnerRelationship Gets the relationship with the owning model of this model.
Returns null if this model is related or if there is no owning model.
GetOwners Get all the owning instances that can be searched by the ownership relationship for this instance.
Returns a collection of instances heading the instance that owns this instance.
Returns an empty collection if the parent element does not exist.
GetRefRelatedModels Acquires the instance that has a reference relationship with this instance according to the specified related class.
If the related class is not specified (null), get all the instances in the reference relationship.
This method evaluates IContextOption.PlModelAccessMode.

This method returns an empty collection if any of the following cases apply:
- There is no instance associated with the reference relationship
- The specified related class cannot be found
- The reference field by the specified related class cannot be found

, If the specified relation class is a self-reference relation, both the relation source and relation destination will be evaluated.
GetRelation Gets the relationship for the specified field.
This method evaluates IContextOption.PlModelAccessMode.

Returns null if the specified fields do not have a valid relationship.
If the multiplicity of the specified field is 2 or more, the relation to the first element of the corresponding field is acquired.
GetRelationAt Gets the relationship at the specified position of the specified field.
This method evaluates IContextOption.PlModelAccessMode.
GetRelations Gets the related collection of the specified field.
This method evaluates IContextOption.PlModelAccessMode.

Returns an empty collection if no such association exists.
GetRelationsByClassTag Gets an instance of the related class with the specified tag from all fields of this instance.
This method evaluates IContextOption.PlModelAccessMode.

Returns an empty collection if no such association exists.
GetRelationsByClassTagOf Gets the association with the given model associated by the association class with the specified tag from all fields of this model.
This method evaluates IContextOption.PlModelAccessMode.

Returns an empty collection if no such association exists.
GetRelationsByFieldOf Gets the relationships of the specified field with the specified model.
This method evaluates IContextOption.PlModelAccessMode.

Returns an empty collection if no such association exists.
GetRelationsByFieldTag Gets the field relationships with the specified tag.
This method evaluates IContextOption.PlModelAccessMode.

Returns an empty collection if no such association exists.
GetRelationsByFieldTagOf Gets the relationship with the given model from the field with the given tag.
This method evaluates IContextOption.PlModelAccessMode.

Returns an empty collection if no such association exists.
GetRelationsByTag Gets the relationships with the specified tag in the specified field.
This method evaluates IContextOption.PlModelAccessMode.

Returns an empty collection if no such association exists.
GetRelationsOf Get all associations with the specified model.
This method evaluates IContextOption.PlModelAccessMode.

Returns an empty collection if no such association exists.
Note that this method retrieves all relationships, regardless of ownership/reference relationships.
GetRelationsOfWhere Gets the associations with the given model that meet the specified conditions of this instance.
This method evaluates IContextOption.PlModelAccessMode.

Returns an empty collection if no such association exists.

The relation of acquisition target can be arbitrarily determined by the evaluation function.
GetRelationsWhere Get all the relations that meet the specified conditions of this instance.
This method evaluates IContextOption.PlModelAccessMode.

Returns an empty collection if no such association exists.

The relation of acquisition target can be arbitrarily determined by the evaluation function.
Is Checks if this instance is an instance of the specified class.
Returns True if it is an instance of the specified class
IsIn(IEnumerable<string>,bool) Checks if this instance is an instance of one of the specified classes.
Returns True if it is an instance of any of the specified classes.
IsIn(string,bool) Checks if this instance is an instance of one of the specified classes.
Returns True if it is an instance of any of the specified classes.
IsRelatedAtFieldTo Checks if this instance has a lookup relationship with the given model on the given field.
Returns True if related.
IsRelatedTo Checks if this instance has a reference association with the given model.
Returns True if related.
MoveTo Move this instance to be a child of the specified model.
If the destination parent element and field are the same as the current parent element and field, change the order of the elements in the specified field.
Note that an exception is not thrown even if the multiplicity upper limit constraint of the destination field is violated.
Relate Associates the given model at the end of the specified field of this instance and returns the added related instance.
RelateAll Associates the given model with all reference fields that can be associated with the given model of this instance and returns a collection of all the associated instances added ..
If a deleted model or temporary proxy is specified for the model to be associated, the association will not be performed.
Returns an empty collection if no association was made.

This method excludes fields that do not meet the following constraints.
[Evaluation Constraints]
-Path Constraints
-Type Constraints
-Maximum Multiplicity
-Operability
RelateAllDerivedFrom All related instances added by associating the given model as the derivation source with all the fields that can be associated with the given model of this instance as the derivation source Returns a collection of.
If a deleted model or temporary proxy is specified for the model to be associated, the association will not be performed.
Returns an empty collection if no association was made.

This method excludes fields that do not meet the following constraints.
[Evaluation Constraints]
-Path Constraints
-Type Constraints
-Maximum Multiplicity
-Operability
RelateAllDerivedTo All related instances that are added by associating the given model as the derivation destination with all the fields to which the given model of this instance can be derived Returns a collection of.
If a deleted model or temporary proxy is specified for the model to be associated, the association will not be performed.
Returns an empty collection if no association was made.

This method excludes fields that do not meet the following constraints.
[Evaluation Constraints]
-Path Constraints
-Type Constraints
-Maximum Multiplicity
-Operability
RelateAt Associates the given model with the specified position in the specified field of this instance and returns the added related instance.
RelateByClassTag A collection of all the related instances added by associating the model given by the reference field that can be related by the related class with the specified tag of this instance. Returns
If a deleted model or temporary proxy is specified for the model to be associated, the association will not be performed.
Returns an empty collection if no association was made.

This method excludes fields that do not meet the following constraints.
[Evaluation Constraints]
-Path Constraints
-Type Constraints
-Maximum Multiplicity
-Operability
RelateByFieldTag Returns a collection of all added related instances associated with the given model in the referenced field with the specified tag for this instance.
If a deleted model or temporary proxy is specified for the model to be associated, the association will not be performed.
Returns an empty collection if no association was made.

This method excludes fields that do not meet the following constraints.
[Evaluation Constraints]
-Path Constraints
-Type Constraints
-Maximum Multiplicity
-Operability
RelateWhere Associates the given model with all reference fields that match the specified conditions of this instance and returns a collection of all the related instances that were added.
If a deleted model or temporary proxy is specified for the model to be associated, the association will not be performed.
Returns an empty collection if no association was made.

The reference field to be associated can be arbitrarily determined by the evaluation function.
However, even if it matches the evaluation function, if the field satisfies the following conditions, it will not be associated and will end normally.
-When the path constraint of the field is violated
-When the type of the field is incompatible with the given model
-When the multiplicity of the field is exceeded
-The following fields satisfy the conditions If it is a non-operable field of
-Product line feature assignment field
-Field with System.Core tag
RemoveError Removes the error information added to this model.
If null or error information that is not included in this model is specified for the error information to be deleted, nothing will be done and the process will end normally.
RemoveField Removes the value of the specified field in this instance.
If the specified field is the owning field, delete the specified model.
If the specified field is a reference field, only the reference association is deleted and the model is retained.

If the model specified as the deletion target is not included in the specified field, nothing is done and the process ends normally.
RemoveFieldAt Removes the field value at the specified position of this instance.
If the specified field is the owning field, delete the model at the specified position.
If the specified field is a reference field, only the reference association at the specified position is deleted and the model is retained.
SetField Sets the specified value to the specified field of this instance.
If a value that cannot be set for the specified field is specified, an exception will be thrown.
If the multiplicity of the specified field is 2 or more, set the first element of the corresponding field.
SetFieldAt Sets the specified value at the specified index position of the specified field in this instance.
If a value that cannot be set for the specified field is specified, an exception will be thrown.
Note that no exception is thrown even if the field multiplicity upper limit constraint or path constraint is violated.
SetInitField Sets the specified field in this instance to the initial value of the field defined in the metamodel.
If you have not specified the initial value of the field in the metamodel, set the default value of the field type.

If you call this method on the owning field of the class type, the IModel set as the field value will be deleted.
If you call this method on a reference field of class type, the association with the IModel that was set as the field value is deleted (the IModel of the field value is not deleted and is maintained).
Take Moves the specified model to the specified field of this instance.
This instance is the parent element of the model to be moved.
Note that an exception is not thrown even if the multiplicity upper limit constraint of the destination field is violated.
UnRelate Removes the reference association with the given model on the specified field of this instance.
If there are multiple associations in the relevant field, all the associations will be released.
If there is no relation with the given model, nothing is done and the process ends normally.
UnRelateAll Removes all reference associations with this model for this instance.
If there is no relation with the given model, nothing is done and the process ends normally.
In addition, the relation to the fields that meet the following conditions will not be released and will end normally.
-Association in the field for product line support
-Association in the field with System.Core tag
UnRelateAllDerivedFrom Removes all associations from which the given model of this instance is derived.
If there is no relation with the given model, nothing is done and the process ends normally.
In addition, the relation to the fields that meet the following conditions will not be released and will end normally.
-Association in the field for product line support
-Association in the field with System.Core tag
UnRelateAllDerivedTo Unassociates all instances of the given model of this instance.
If there is no relation with the given model, nothing is done and the process ends normally.
In addition, the relation to the fields that meet the following conditions will not be released and will end normally.
-Association in the field for product line support
-Association in the field with System.Core tag
UnRelateByClassTag Disassociates the model given by the reference field that can be associated by the associated class with the specified tag of this instance.
If there is no relation with the given model, nothing is done and the process ends normally.
In addition, the relation to the fields that meet the following conditions will not be released and will end normally.
-Association in the field for product line support
-Association in the field with System.Core tag
UnRelateByFieldTag Unassociates this model with the given model in the referenced field with the given tag.
If there is no relation with the given model, nothing is done and the process ends normally.
In addition, the relation to the fields that meet the following conditions will not be released and will end normally.
-Association in the field for product line support
-Association in the field with System.Core tag
UnRelateWhere Removes all reference associations with the given model of this instance that meet the specified criteria.

The target for releasing the association can be arbitrarily determined by the evaluation function.
However, the association that meets the following conditions will not be canceled and will end normally.
-When the relationship that matches the conditions is for product line support
-When the System.Core tag is added to the field at the related end that matches the conditions
Validate Validate this model.
Recursively validates all elements under this model and child elements owned by this model.
This method clears all previous error information at run time.

[Validation content]
-Standard validation specified by application
-Validation extended by extension validation event